<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/9/3
 * Time: 15:04
 */

namespace app\model;


use think\Model;

class Address extends Model
{
    public static function onBeforeWrite($data)
    {
        $data->prov = explode(' ',$data['area_info'])[0];
        $data->city = explode(' ',$data['area_info'])[1];
        $data->area = explode(' ',$data['area_info'])[2];
    }
}